package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxzc_work_picture;
import cn.bj.dao.Yxzc_work_pictureMapper;

@Service
public class YxzcWorkPictureService {
	@Autowired
	Yxzc_work_pictureMapper yxzc_work_pictureMapper;

	// 查询所有
	public List<Yxzc_work_picture> getAllYxhqWorkPicture() {
		return yxzc_work_pictureMapper.selectByExample(null);
	}

	// 插入
	public int insertYxzcWp(Yxzc_work_picture yxzcWP) {
		return yxzc_work_pictureMapper.insert(yxzcWP);
	}

	// 删除
	public int deleteByYxhqWP(Integer id) {
		return yxzc_work_pictureMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxzc_work_picture selectById(Integer id) {
		return yxzc_work_pictureMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateYxzcWp(Yxzc_work_picture yzp) {
		return yxzc_work_pictureMapper.updateByPrimaryKey(yzp);
	}

}
